home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
vdl020d.zip
/
VCOLOR.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
12KB
|
736 lines
{
════════════════════════════════════════════════════════════════════════════
Visionix Color Control Unit (VCOLOR)
Copyright 1991,92,93 Visionix
ALL RIGHTS RESERVED
────────────────────────────────────────────────────────────────────────────
Revision history in reverse chronological order:
Initials Date Comment
──────── ──────── ────────────────────────────────────────────────────────
lpg 03/15/93 Added Source Documentation
mep 02/11/93 Cleaned up code for beta release
jrt 02/08/93 Sync with beta 0.12 release
jrt 12/07/92 Sync with beta 0.11 release
jrt 11/21/92 Sync with beta 0.08
jrt 09/01/92 First logged revision.
════════════════════════════════════════════════════════════════════════════
}
Unit VColor;
Uses
VTypes,
VGen;
{────────────────────────────────────────────────────────────────────────────}
Type
TError = WORD;
{----}
TColorNamesEntry = RECORD
Name : ST20;
Value : WORD;
END;
{----}
TColorNames = RECORD
NumNames : WORD;
Entry : Array[1..64] of TColorNamesEntry;
END;
PColorNames = ^TColorNames;
{----}
TColorMap = RECORD
Entry : Array[0..256] of WORD;
END;
PColorMap = ^TColorMap;
{----}
TColorPalEntry = RECORD
R : BYTE;
G : BYTE;
B : BYTE;
END;
PColorPalEntry = ^TColorPalEntry;
{----}
TColorPal = RECORD
Entry : Array[0..255] of TColorPalEntry;
END;
PColorPal = ^TColorPal;
{────────────────────────────────────────────────────────────────────────────}
{ this unit is incomplete }
Procedure VColorNamesSubmit( Names : PColorNames );
Function VColorNamesRead( FileName : ST80;
NamesName : ST80 ) : TError;
Function VColorNamesWrite( FileName : ST80;
NamesName : ST80 ) : TError;
Procedure VColorNamesEntrySet( EntryName : ST20;
Value : WORD );
Function VColorNamesEntryGet( EntryName : ST20 ) : WORD;
Function CN( EntryName : ST20 ) : WORD;
Procedure VColorNamesEntryDel( EntryName : ST20 );
Procedure VColorNamesPush;
Procedure VColorNamesPop;
Procedure VColorMapSubmit( Map : PColorMap );
Function VColorMapRead( FileName : ST80;
MapName : ST80 ) : TError;
Function VColorMapWrite( FileName : ST80;
MapName : ST80 ) : TError;
Procedure VColorMapEntrySet( EntryNum : BYTE;
Value : WORD );
Function VColorMapEntryGet( EntryNum : BYTE ) : WORD;
Function CM ( EntryNum : BYTE ) : WORD;
Procedure VColorMapPush;
Procedure VColorMapPop;
Function VColorPalRead( FileName : ST80;
MapName : ST80 ) : TError;
Function VColorPalWrite( FileName : ST80;
MapName : ST80 ) : TError;
Procedure VColorPalSet( EntryNum : BYTE;
R : BYTE;
G : BYTE;
B : BYTE );
Procedure VColorPalGet( EntryNum : BYTE;
Var R : BYTE;
Var G : BYTE;
Var B : BYTE );
Procedure VColorPalPush;
Procedure VColorPalPop;
{────────────────────────────────────────────────────────────────────────────}
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorNamesSubmit( Names : PColorNames );
[PARAMETERS]
Name Pointer to Color Names Data
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorNamesRead( FileName : ST80;
NamesName : ST80 ) : TError;
[PARAMETERS]
FileName ?
NamesName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorNamesWrite( FileName : ST80;
NamesName : ST80 ) : TError;
[PARAMETERS]
FileName ?
NamesName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VGetCNameEntryNum( EntryName : ST20 ) : INTEGER;
[PARAMETERS]
EntryName Color Entry Name
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorNamesEntrySet( EntryName : ST20;
Value : WORD );
[PARAMETERS]
EntryName Color Entry Name
Value Color Value
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorNamesEntryGet( EntryName : ST20 ) : WORD;
[PARAMETERS]
EntryName Color Entry Name
[RETURNS]
Color Entry Number
[DESCRIPTION]
Locates the Color Entry Number based upon an assigned Entry Name.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function CN( EntryName : ST20 ) : WORD;
[PARAMETERS]
EntryName Color Entry Name
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorNamesEntryDel( EntryName : ST20 );
[PARAMETERS]
EntryName Color Palette Entry Name
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorNamesPush;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorNamesPop;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorMapSubmit( Map : PColorMap );
[PARAMETERS]
Map Pointer to Color Mapping Data
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorMapRead( FileName : ST80;
MapName : ST80 ) : TError;
[PARAMETERS]
FileName ?
MapName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorMapWrite( FileName : ST80;
MapName : ST80 ) : TError;
[PARAMETERS]
FileName ?
MapName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorMapEntrySet( EntryNum : BYTE;
Value : WORD );
[PARAMETERS]
EntryNum Color Entry Number
Value New Color Mapping Value
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorMapEntryGet( EntryNum : BYTE ) : WORD;
[PARAMETERS]
EntryNum Color Entry Number
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function CM( EntryNum : BYTE ) : WORD;
[PARAMETERS]
EntryNum Color Entry Number
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorMapPush;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorMapPop;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorPalSubmit( ColorPal : PColorPal );
[PARAMETERS]
ColorPal Pointer to Color Palette
[RETURNS]
(None)
[DESCRIPTION]
Sets the Complete Color Palette Provided.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorPalRead( FileName : ST80;
MapName : ST80 ) : TError;
[PARAMETERS]
FileName ?
MapName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function VColorPalWrite( FileName : ST80;
MapName : ST80 ) : TError;
[PARAMETERS]
FileName ?
MapName ?
[RETURNS]
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorPalSet( EntryNum : BYTE;
R : BYTE;
G : BYTE;
B : BYTE );
[PARAMETERS]
EntryNum Color Palette Entry Number
R Source Red Value for Entry
G Source Green Value for Entry
B Source Blue Value for Entry
[RETURNS]
(None)
[DESCRIPTION]
Modifies the Selected Color Palette Entry to contain the new Source
Red/Green/Blue component values.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorPalGet( EntryNum : BYTE;
Var R : BYTE;
Var G : BYTE;
Var B : BYTE );
[PARAMETERS]
EntryNum Color Palette Entry Number
R VAR Returned Red Value for Entry
G VAR Returned Green Value for Entry
B VAR Returned Blue Value for Entry
[RETURNS]
(Function : None)
(VAR : [R] Red Value for Entry)
(VAR : [G] Green Value for Entry)
(VAR : [B] Blue Value for Entry)
[DESCRIPTION]
Reads the Selected Color Palette Entry and returns the Red/Green/Blue
components of the Entry.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorPalPush;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Procedure VColorPalPop;
[PARAMETERS]
(None)
[RETURNS]
(None)
[DESCRIPTION]
[SEE-ALSO]
[EXAMPLE]